<!DOCTYPE html>
<html lang="en">
<head>
    <title>JavaScript example</title>
    <meta charSet="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&amp;display=swap"
          rel="stylesheet"/>
    <style media="only screen">
        html, body {
            height: 100%;
            width: 100%;
            margin: 0;
            box-sizing: border-box;
            -webkit-overflow-scrolling: touch;
        }

        html {
            position: absolute;
            top: 0;
            left: 0;
            padding: 0;
            overflow: auto;
        }

        body {
            padding: 16px;
            overflow: auto;
            background-color: transparent
        }
    </style>
</head>
<body>
<div id="myGrid" style="width: 100%; height: 100%" class="ag-theme-quartz">
</div>
<script>var __basePath = './';</script>
<script src="./node_modules/ag-grid-community/dist/ag-grid-community.js">
</script>
<script>
    // Grid API: Access to Grid API methods
    let gridApi;

    // Grid Options: Contains all of the grid configurations
    /** @type {import('ag-grid-community').GridOptions} */
    const gridOptions = {
        // Row Data: The data to be displayed.
        rowData: [
            {make: "Tesla", model: "Model Y", price: 64950, electric: true},
            {make: "Ford", model: "F-Series", price: 33850, electric: false},
            {make: "Toyota", model: "Corolla", price: 29600, electric: false},
            {make: 'Mercedes', model: 'EQA', price: 48890, electric: true},
            {make: 'Fiat', model: '500', price: 15774, electric: false},
            {make: 'Nissan', model: 'Juke', price: 20675, electric: false},
        ],
        // Column Definitions: Defines & controls grid columns.
        columnDefs: [
            {field: "make"},
            {field: "model"},
            {field: "price"},
            {field: "electric"}
        ]
    }

    // Create Grid: Create new grid within the #myGrid div, using the Grid Options object
    gridApi = agGrid.createGrid(document.querySelector('#myGrid'), gridOptions);
</script>
</body>
</html>
